@import "remixicon.min.css";
@import "animate.min.css";
/* 基础样式 */
:root {
  --primary-color: #4a6cf7;
  --primary-hover: #3a5ce8;
  --primary-light: rgba(74, 108, 247, 0.1);
  --text-color: #333;
  --text-secondary: #666;
  --background-color: #f5f7fb;
  --card-background: #ffffff;
  --border-color: #e6e8ec;
  --sidebar-bg: #ffffff;
  --sidebar-active: #f0f4ff;
  --sidebar-hover: #f5f7fc;
  --sidebar-text: #333;
  --sidebar-active-text: #4a6cf7;
  --error-color: #e53935;
  --warning-color: #f9a825;
  --success-color: #43a047;
  --info-color: #039be5;
  --progress-bg: #e0e0e0;
  --tooltip-bg: rgba(0, 0, 0, 0.8);
  --tooltip-text: white;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  --shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.15);
  --modal-overlay: rgba(0, 0, 0, 0.5);
  --download-item-hover: #f5f7fc;
  --icon-color: #666;
  --icon-hover: #4a6cf7;
  --notification-bg: #ffffff;
  --notification-success: #43a047;
  --notification-error: #e53935;
  --notification-info: #039be5;
  --notification-warning: #f9a825;
  --detail-sidebar-width: 400px;
  --chart-grid-color: #eee;
  --chart-line-color: #4a6cf7;
}

/* 暗色主题变量 */
[data-theme="dark"] {
  --primary-color: #5c7df9;
  --primary-hover: #6d8afa;
  --primary-light: rgba(92, 125, 249, 0.15);
  --text-color: #e0e0e0;
  --text-secondary: #aaa;
  --background-color: #121212;
  --card-background: #1e1e1e;
  --border-color: #333;
  --sidebar-bg: #1a1a1a;
  --sidebar-active: #2c2c2c;
  --sidebar-hover: #252525;
  --sidebar-text: #e0e0e0;
  --sidebar-active-text: #5c7df9;
  --progress-bg: #333;
  --tooltip-bg: rgba(30, 30, 30, 0.9);
  --tooltip-text: #e0e0e0;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.4);
  --modal-overlay: rgba(0, 0, 0, 0.7);
  --download-item-hover: #252525;
  --icon-color: #aaa;
  --icon-hover: #5c7df9;
  --notification-bg: #1e1e1e;
  --notification-success: #43a047;
  --notification-error: #e53935;
  --notification-info: #039be5;
  --notification-warning: #f9a825;
  --chart-grid-color: #333;
  --chart-line-color: #5c7df9;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans",
    "Helvetica Neue", sans-serif;
}

body {
  background-color: var(--background-color);
  color: var(--text-color);
  transition: background-color 0.3s, color 0.3s;
}
input {
  height: 36px;
  width: 100%;
  border-radius: 4px;
  border: 1px solid var(--border-color);
  padding: 0 10px;
  font-size: 0.9rem;
  background-color: var(--card-background);
  color: var(--text-color);
  transition: border-color 0.3s, background-color 0.3s, color 0.3s;
}
input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px var(--primary-light);
}
textarea{
  width: 100%;
  height: 100px;
  border-radius: 4px;
  border: 1px solid var(--border-color);
}
/* 布局 */
.app-container {
  display: flex;
  min-height: 100vh;
}

/* 侧边栏 */
.sidebar {
  width: 250px;
  background-color: var(--sidebar-bg);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: fixed;
  transition: background-color 0.3s, border-color 0.3s;
  z-index: 10;
}

.sidebar-header {
  padding: 20px;
  border-bottom: 1px solid var(--border-color);
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo i {
  font-size: 24px;
  color: var(--primary-color);
}

.sidebar-header h2 {
  color: var(--sidebar-active-text);
  font-size: 1.2rem;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 10px 0;
}

.nav-section {
  margin-bottom: 20px;
}

.nav-header {
  padding: 10px 20px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--sidebar-text);
  opacity: 0.7;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-header i {
  font-size: 16px;
}

.nav-items {
  list-style-type: none;
}

.nav-item {
  position: relative;
  cursor: pointer;
  display: flex;
  align-items: center;
  padding: 10px 20px;
  margin: 2px 8px;
  border-radius: 4px;
  transition: background-color 0.2s, color 0.2s;
}

.nav-item i {
  font-size: 18px;
  margin-right: 10px;
  color: var(--sidebar-text);
  transition: color 0.2s;
}

.nav-link {
  color: var(--sidebar-text);
  text-decoration: none;
  transition: color 0.2s;
}

.nav-item:hover {
  background-color: var(--sidebar-hover);
}

.nav-item.active {
  background-color: var(--sidebar-active);
}

.nav-item.active i,
.nav-item.active .nav-link {
  color: var(--sidebar-active-text);
  font-weight: 500;
}

.sidebar-footer {
  padding: 15px 20px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.version {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* 主题切换 */
.theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background-color: var(--sidebar-hover);
  transition: background-color 0.2s;
}

.theme-toggle:hover {
  background-color: var(--sidebar-active);
}

.theme-toggle-icon {
  position: absolute;
  transition: opacity 0.3s, transform 0.3s;
  font-size: 18px;
}

[data-theme="light"] .theme-toggle-icon.dark,
[data-theme="dark"] .theme-toggle-icon.light {
  opacity: 0;
  transform: scale(0);
}

[data-theme="light"] .theme-toggle-icon.light,
[data-theme="dark"] .theme-toggle-icon.dark {
  opacity: 1;
  transform: scale(1);
}

/* 主内容 */
.main-content {
  flex: 1;
  padding: 20px;
  margin-left: 250px;
  transition: margin-left 0.3s;
}

.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.top-bar-left {
  display: flex;
  flex-direction: column;
}

#page-title {
  font-size: 1.5rem;
  margin-bottom: 5px;
  color: var(--text-color);
}

#sub-title {
  font-size: 1rem;
  font-weight: normal;
  color: var(--text-secondary);
}

.actions {
  display: flex;
  align-items: center;
  gap: 15px;
}

/* 内容区域 */
.content-section {
  display: none;
  background-color: var(--card-background);
  border-radius: 8px;
  box-shadow: var(--shadow);
  min-height: 500px;
  transition: background-color 0.3s, box-shadow 0.3s;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.content-section.active {
  display: block;
}

.content-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  border-bottom: 1px solid var(--border-color);
}

.content-header h2 {
  font-size: 1.2rem;
  color: var(--text-color);
}

.content-actions {
  display: flex;
  align-items: center;
  gap: 15px;
}

/* 筛选和排序 */
.filter-sort-container {
  display: flex;
  gap: 15px;
  align-items: center;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-group label {
  font-size: 0.9rem;
  white-space: nowrap;
  color: var(--text-secondary);
}

.sort-container {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sort-container label {
  font-size: 0.9rem;
  white-space: nowrap;
  color: var(--text-secondary);
}

.sort-select,
.filter-select,
.filter-input {
  height: 36px;
  border-radius: 4px;
  border: 1px solid var(--border-color);
  padding: 0 10px;
  font-size: 0.9rem;
  background-color: var(--card-background);
  color: var(--text-color);
  transition: border-color 0.3s, background-color 0.3s, color 0.3s;
}

.sort-select:focus,
.filter-select:focus,
.filter-input:focus {
  outline: none;
  border-color: var(--primary-color);
}

/* 下载列表 */
.download-list {
  overflow-y: auto;
  max-height: calc(100vh - 180px);
  padding: 10px;
  overflow-x: hidden;
}
.download-list::-webkit-scrollbar ,.detail-sidebar-content::-webkit-scrollbar {
  background-color: #ccc;
  width: 8px;
  transition: all 0.2s ease;
  background-clip: padding-box;
}
.download-list::-webkit-scrollbar-thumb,.detail-sidebar-content::-webkit-scrollbar-thumb {
  background-color: #999;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.download-item {
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 10px;
  background-color: var(--card-background);
  border: 1px solid var(--border-color);
  position: relative;
  transition: all 0.2s ease;
  box-shadow: var(--shadow);
  cursor: pointer;
}

.download-item:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
  border-color: var(--primary-color);
}

.download-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.download-title {
  font-weight: 500;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.download-info-badge {
  font-size: 0.75rem;
  color: var(--sidebar-text);
  background-color: var(--primary-light);
  padding: 2px 8px;
  border-radius: 10px;
}

.download-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  padding: 4px 10px;
  border-radius: 12px;
  color: white;
  animation: fadeIn 0.3s ease;
}

.download-status.downloading {
  background-color: var(--info-color);
}

.download-status.completed {
  background-color: var(--success-color);
}

.download-status.error {
  background-color: var(--error-color);
}

.download-status.stopped {
  background-color: var(--warning-color);
}

.download-status.pending {
  background-color: var(--notification-warning);
}

.download-status i {
  font-size: 14px;
}

.download-details {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 10px;
  font-size: 0.85rem;
  color: var(--text-color);
  opacity: 0.8;
}

.download-detail {
  display: flex;
  align-items: center;
  gap: 5px;
}

.download-detail i {
  font-size: 14px;
}

.download-progress-container {
  margin-bottom: 10px;
}

.download-progress-bar {
  height: 8px;
  background-color: var(--progress-bg);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.download-progress-inner {
  height: 100%;
  background-color: var(--primary-color);
  border-radius: 4px;
  transition: width 0.3s ease;
  position: relative;
  overflow: hidden;
}

.download-progress-inner::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.2) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  animation: progressShine 1.5s infinite;
  display: none;
}

.downloading .download-progress-inner::after {
  display: block;
}

@keyframes progressShine {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

.download-progress-text {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-color);
  opacity: 0.8;
  margin-top: 4px;
}

.download-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.action-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background-color: var(--sidebar-hover);
  color: var(--icon-color);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.action-btn:hover {
  background-color: var(--sidebar-active);
  color: var(--icon-hover);
  transform: translateY(-2px);
}

.action-btn:active {
  transform: translateY(0);
}

.action-btn.resume,
.action-btn.retry {
  color: var(--success-color);
}

.action-btn.pause {
  color: var(--warning-color);
}

.action-btn.delete {
  color: var(--error-color);
  width: 48px;
}

.action-btn i {
  font-size: 16px;
}

.error-message {
  margin-top: 8px;
  padding: 8px 12px;
  background-color: rgba(229, 57, 53, 0.1);
  border-left: 3px solid var(--error-color);
  border-radius: 4px;
  font-size: 0.85rem;
  color: var(--error-color);
  display: none;
  animation: fadeIn 0.3s ease;
}

.download-item.has-error .error-message {
  display: block;
}

/* 提示框 */
.tooltip {
  position: relative;
  display: inline-block;
}

.tooltip .tooltip-text {
  visibility: hidden;
  width: auto;
  min-width: 120px;
  background-color: var(--tooltip-bg);
  color: var(--tooltip-text);
  text-align: center;
  border-radius: 4px;
  padding: 5px 10px;
  position: absolute;
  z-index: 1;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  transition: opacity 0.3s;
  font-size: 0.75rem;
  white-space: nowrap;
}

.tooltip .tooltip-text::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: var(--tooltip-bg) transparent transparent transparent;
}

.tooltip:hover .tooltip-text {
  visibility: visible;
  opacity: 1;
}

/* 设置区域 */
.settings-section {
  padding: 0;
}

.settings-content {
  padding: 20px;
}

.settings-group {
  margin-bottom: 20px;
  background-color: var(--card-background);
  padding: 15px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  transition: border-color 0.2s;
}

.settings-group:hover {
  border-color: var(--primary-color);
}

.settings-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
}

.settings-group input[type="text"],
.settings-group input[type="number"],
.settings-group select,
.settings-group textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  background-color: var(--card-background);
  color: var(--text-color);
  transition: border-color 0.3s, background-color 0.3s, color 0.3s;
}

.settings-group input:focus,
.settings-group select:focus,
.settings-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
}

.settings-group textarea {
  height: 100px;
  resize: vertical;
}

.directory-input {
  display: flex;
  gap: 10px;
}

.directory-input input {
  flex: 1;
}

.settings-actions {
  margin-top: 30px;
  display: flex;
  justify-content: flex-end;
}

/* 按钮 */
.primary-btn {
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 4px;
  padding: 10px 20px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.primary-btn:hover {
  background-color: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.primary-btn:active {
  transform: translateY(0);
  box-shadow: none;
}

.primary-btn i {
  font-size: 16px;
}

.secondary-btn {
  background-color: var(--card-background);
  color: var(--text-color);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 9px 15px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.secondary-btn:hover {
  border-color: var(--primary-color);
  background-color: var(--sidebar-hover);
  transform: translateY(-2px);
}

.secondary-btn:active {
  transform: translateY(0);
}

.secondary-btn i {
  font-size: 16px;
}

/* 开关切换 */
.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 24px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--progress-bg);
  transition: .4s;
}

.slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: .4s;
}

input:checked + .slider {
  background-color: var(--primary-color);
}

input:focus + .slider {
  box-shadow: 0 0 1px var(--primary-color);
}

input:checked + .slider:before {
  transform: translateX(26px);
}

.slider.round {
  border-radius: 24px;
}

.slider.round:before {
  border-radius: 50%;
}

/* 表单行 */
.form-row {
  display: flex;
  gap: 15px;
  margin-bottom: 15px;
}

.form-group.half {
  flex: 1;
}

.form-group.third {
  flex: 1;
}

/* 模态框 */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: var(--modal-overlay);
}

.modal-content {
  background-color: var(--card-background);
  margin: 5% auto;
  width: 600px;
  max-width: 90%;
  border-radius: 8px;
  box-shadow: var(--shadow);
  animation: modalopen 0.3s;
}

@keyframes modalopen {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-header {
  padding: 15px 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h2 {
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-header h2 i {
  color: var(--primary-color);
}

.close-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-color);
  transition: color 0.2s;
}

.close-btn:hover {
  color: var(--error-color);
}

.modal-body {
  padding: 20px;
  max-height: 60vh;
  overflow-y: auto;
}

.modal-body.compact-form {
  padding: 15px;
}

.modal-footer {
  padding: 15px 20px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.form-group {
  margin-bottom: 15px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
}

.form-group.required label::after {
  content: "*";
  color: var(--error-color);
  margin-left: 4px;
}

.form-hint {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

.form-group.checkbox-group {
  display: flex;
  align-items: center;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
}

/* 紧凑表单样式 */
.compact-form .form-group {
  margin-bottom: 12px;
}

.compact-form .form-group label {
  font-size: 0.9rem;
  margin-bottom: 4px;
}

.compact-form input[type="text"],
.compact-form input[type="number"],
.compact-form select,
.compact-form textarea {
  padding: 8px 12px;
  font-size: 0.9rem;
  border-radius: 4px;
  background-color: var(--card-background);
  color: var(--text-color);
  border: 1px solid var(--border-color);
  transition: border-color 0.3s, background-color 0.3s, color 0.3s;
}
.compact-form input:focus,
.compact-form select:focus,
.compact-form textarea:focus {
  outline: none;
  border-color: var(--primary-color);
}

#proxy-input{
  width: 100%;
}
.compact-form .directory-input button {
  padding: 8px;
}

.compact-form .directory-input button span {
  display: none;
}

/* 空状态 */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 300px;
  text-align: center;
  padding: 20px;
  animation: fadeIn 0.5s ease;
}

.empty-state-icon {
  font-size: 3rem;
  color: var(--border-color);
  margin-bottom: 20px;
}

.empty-state-text {
  max-width: 300px;
  color: var(--text-color);
  opacity: 0.7;
}

/* 通知系统 */
.notification-container {
  position: fixed;
  bottom: 20px;
  left: 100%;
  transform: translateX(-320px);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: calc(100% - 150px);
  max-width: 300px;
  pointer-events: none;
}

.notification {
  background-color: var(--notification-bg);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 15px;
  width: 100%;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  animation: slideUp 0.3s ease;
  position: relative;
  overflow: hidden;
  pointer-events: auto;
}

.notification.success {
  border-left: 4px solid var(--notification-success);
}

.notification.error {
  border-left: 4px solid var(--notification-error);
}

.notification.info {
  border-left: 4px solid var(--notification-info);
}

.notification.warning {
  border-left: 4px solid var(--notification-warning);
}

.notification-icon {
  font-size: 20px;
}

.notification.success .notification-icon {
  color: var(--notification-success);
}

.notification.error .notification-icon {
  color: var(--notification-error);
}

.notification.info .notification-icon {
  color: var(--notification-info);
}

.notification.warning .notification-icon {
  color: var(--notification-warning);
}

.notification-content {
  flex: 1;
}

.notification-title {
  font-weight: 600;
  margin-bottom: 5px;
}

.notification-message {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.notification-close {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 16px;
  transition: color 0.2s;
}

.notification-close:hover {
  color: var(--error-color);
}

.notification-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background-color: var(--primary-color);
  animation: progress 5s linear forwards;
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes slideDown {
  from {
    transform: translateY(0);
    opacity: 1;
  }
  to {
    transform: translateY(100%);
    opacity: 0;
  }
}

@keyframes progress {
  from {
    width: 100%;
  }
  to {
    width: 0%;
  }
}

/* 详情侧边栏 */
.detail-sidebar {
  position: fixed;
  top: 0;
  right: -100%;
  width: var(--detail-sidebar-width);
  height: 100vh;
  background-color: var(--card-background);
  box-shadow: var(--shadow);
  z-index: 1000;
  transition: right 0.3s ease;
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--border-color);
}

.detail-sidebar.active {
  right: 0;
}

.detail-sidebar-header {
  padding: 15px 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.detail-sidebar-header h2 {
  font-size: 1.2rem;
  color: var(--text-color);
}

.close-detail-btn {
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--text-color);
  transition: color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 4px;
}

.close-detail-btn:hover {
  color: var(--error-color);
  background-color: var(--sidebar-hover);
}

.detail-sidebar-content {
  flex: 1;
  overflow-y: auto;
  padding: 15px;
}

.detail-section {
  margin-bottom: 20px;
  padding: 15px;
  background-color: var(--card-background);
  border: 1px solid var(--border-color);
  border-radius: 8px;
}

.detail-section h3 {
  font-size: 1rem;
  margin-bottom: 15px;
  color: var(--text-color);
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 8px;
}

.detail-item {
  display: flex;
  margin-bottom: 10px;
}

.detail-label {
  width: 100px;
  font-weight: 500;
  color: var(--text-secondary);
}

.detail-value {
  word-break: break-word;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  gap: 4px;
}

/* 等待中 */
.status-pending {
  background-color: #e3f2fd;
  color: #1976d2;
  border: 1px solid #bbdefb;
}

/* 准备中 */
.status-preparing {
  background-color: #e8f5e9;
  color: #2e7d32;
  border: 1px solid #c8e6c9;
}

/* 下载中 */
.status-downloading {
  background-color: #e3f2fd;
  color: #1976d2;
  border: 1px solid #bbdefb;
}

/* 合并中 */
.status-merging {
  background-color: #fff3e0;
  color: #e65100;
  border: 1px solid #ffe0b2;
}

/* 已完成 */
.status-completed {
  background-color: #e8f5e9;
  color: #2e7d32;
  border: 1px solid #c8e6c9;
}

/* 已停止 */
.status-stopped {
  background-color: #fff3e0;
  color: #e65100;
  border: 1px solid #ffe0b2;
}

/* 错误 */
.status-error {
  background-color: #ffebee;
  color: #c62828;
  border: 1px solid #ffcdd2;
}

/* 重试中 */
.status-retrying {
  background-color: #e3f2fd;
  color: #1976d2;
  border: 1px solid #bbdefb;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
  100% {
    opacity: 1;
  }
}

.url-container {
  display: flex;
  align-items: center;
  gap: 8px;
}

.url-text {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
}

.copy-url-btn {
  background: none;
  border: none;
  color: var(--icon-color);
  cursor: pointer;
  transition: color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
}

.copy-url-btn:hover {
  color: var(--primary-color);
}

.detail-progress {
  margin-bottom: 15px;
}

.detail-progress-bar {
  height: 10px;
  background-color: var(--progress-bg);
  border-radius: 5px;
  overflow: hidden;
  margin-bottom: 5px;
}

.detail-progress-inner {
  height: 100%;
  background-color: var(--primary-color);
  border-radius: 5px;
  transition: width 0.3s ease;
}

.detail-progress-text {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.detail-stats {
  display: flex;
  justify-content: space-between;
  margin-top: 15px;
}

.detail-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.detail-stat i {
  font-size: 1.5rem;
  color: var(--primary-color);
  margin-bottom: 5px;
}

.detail-stat-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 5px;
}

.speed-chart-container {
  height: 200px;
  margin-top: 10px;
}

.detail-error-message {
  padding: 10px;
  background-color: rgba(229, 57, 53, 0.1);
  border-left: 3px solid var(--error-color);
  border-radius: 4px;
  color: var(--error-color);
  font-size: 0.9rem;
}

.detail-sidebar-footer {
  padding: 15px;
  border-top: 1px solid var(--border-color);
}
.detail-sidebar-footer .action-btn {
  display: flex;
  justify-content: center;
  gap: 10px;
  width: auto;
  padding: 10px 15px;
  border-radius: 4px;
  font-size: 0.9rem;
  transition: background-color 0.2s, color 0.2s;
}
.detail-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.detail-sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--modal-overlay);
  z-index: 999;
  display: none;
}

.detail-sidebar-overlay.active {
  display: block;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .sidebar {
    width: 60px;
  }

  .sidebar-header h2,
  .nav-header span,
  .nav-link,
  .version {
    display: none;
  }

  .logo {
    justify-content: center;
  }

  .nav-item {
    justify-content: center;
    padding: 10px;
  }

  .nav-item i {
    margin-right: 0;
  }

  .main-content {
    margin-left: 60px;
  }

  .filter-sort-container {
    flex-direction: column;
    align-items: flex-start;
  }

  .download-details {
    flex-direction: column;
    gap: 10px;
  }

  .detail-sidebar {
    width: 100%;
  }
}
